<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width = device-width, initial-scale = 1.0, maximum-scale = 1.0, user-scalable = 0" />
    <title>{{ $listsSetting->title }}</title>
    <link rel="shortcut icon" href="https://ttwls.oss-cn-beijing.aliyuncs.com/assets/images/admin/favicon.ico"/>
    <link rel="stylesheet" type="text/css" href="https://res.wx.qq.com/open/libs/weui/2.4.0/weui.min.css">
    <script src="https://wailiancn.oss-cn-beijing.aliyuncs.com/assets/js/v2/jquery-3.5.1-min.js?versionId=CAEQFBiBgIDTy.Pa0hciIDc3NWY0YjVhMTdlYTRmMDliNzRlMGQyMWUxMTg5MjQw"></script>
    <script src="https://wailiancn.oss-cn-beijing.aliyuncs.com/assets/js/v2/mui.min.js?versionId=CAEQHxiBgMCsp7iT5hciIDUyMWZjM2NkMTY2NjQ2NGZiOGIyZDE4ZTg1Mjk1NGMx"></script>
    <script src="https://wailiancn.oss-cn-beijing.aliyuncs.com/assets/js/v2/clipboard.min.js?versionId=CAEQHxiBgMCkp7iT5hciIGQ3ZmZkMWFlNWYxNDQ0Y2RhOWU3ZWUyOTU4NzhiMDRi"></script>
    <link rel="stylesheet" type="text/css" href="https://ttwls.oss-cn-beijing.aliyuncs.com/v/v3/home_links.min.css?v=2022062401">
</head>
<body>
    <div id="public-web-container" class="public-container">
        <div class="public-container-main">
            <div class="safe-notice">
                <i class="weui-icon-safe-success"></i>
                <p>本链接经过<font style="font-weight: 500;color: #333333;">SSL安全加密</font>,请放心点击!</p>
            </div>
            <div class="wechat-addfriend-cotainer">
                @if($listsSetting->logo != "https://nilife.oss-cn-beijing.aliyuncs.com/miniapp/services_default.jpg")
                <img src="{{ empty($listsSetting->logo) ? 'https://nilife.oss-cn-beijing.aliyuncs.com/wepage/20210421-180054-178.png' : $listsSetting->logo }}" class="wechat-addfriend-avatar">
                @else
                <img class="wechat-addfriend-avatar" src="https://nilife.oss-cn-beijing.aliyuncs.com/wepage/20210421-180054-178.png">
                @endif
                <font class="wechat-addfriend-nike">{{ empty($listsSetting->nike) ? $listsSetting->title  : $listsSetting->nike }}</font>

                <div class="wechat-add-coptainer">
                    @if($listsSetting->platfrom_type == 1 || $listsSetting->platfrom_type == 12)
                    <a href="weixin://" class="wechat-add-addbutton" id="copywechat" data-clipboard-text="{{ $listsSetting->wechat }}">复制公众号并打开微信</a>
                    <div class="wechat-addfriend-step">
                        <h5>如何关注公众号:</h5>
                        <p>1、点击上方按钮复制公众号；</p>
                        <p>2、前往微信搜一搜找到公众号；</p>
                        <p>3、点击关注公众号。</p>
                        <p>如不会操作点击<font onclick="showHelp(1);">查看教程</font>。</p>
                    </div>
                    @elseif($listsSetting->platfrom_type == 4 || $listsSetting->platfrom_type == 5 || $listsSetting->platfrom_type == 11)
                    <a href="weixin://" class="wechat-add-addbutton" id="copywechat" data-clipboard-text="{{ $listsSetting->wechat }}">复制小程序并打开微信</a>
                    <div class="wechat-addfriend-step">
                        <h5>如何前往小程序:</h5>
                        <p>1、点击底部复制小程序名称；</p>
                        <p>2、前往微信搜一搜再小程序中查找；</p>
                        <p>3、点击进入小程序。</p>
                        <p>如不会操作点击<font onclick="showHelp(1);">查看教程</font>。</p>
                    </div>
                    @elseif($listsSetting->platfrom_type == 8 || $listsSetting->platfrom_type == 9)
                    <a href="weixin://" class="wechat-add-addbutton" id="copywechat" data-clipboard-text="{{ $listsSetting->wechat }}">复制微信号并打开微信</a>
                    <div class="wechat-addfriend-step">
                        <h5>如何添加微信:</h5>
                        <p>1、点击底部复制微信号；</p>
                        <p>2、点击微信右上角添加好友；</p>
                        <p>3、粘贴后点击搜索,添加好友即可。</p>
                        <p>如不会操作点击<font onclick="showHelp(3);">查看教程</font>。</p>
                    </div>
                    @else
                    <a href="weixin://" class="wechat-add-addbutton" id="copywechat" data-clipboard-text="{{ $listsSetting->wechat }}">复制并打开微信</a>
                    <div class="wechat-addfriend-button-descript">
                        点击自动复制内容并打开微信，粘贴即可添加好友。如不会操作点击<font onclick="showHelp(3);">查看教程</font>。
                    </div>
                    @endif

                    <img id="wechataddgif" class="wechat-addfriend-help" src="">
                </div>

                <input type="hidden" value="{{ $listsSetting->platfrom_type }}" id="platfrom_type">
                <div class="wechat-addfriend-copyright">
                    <a href="https://nilife.cn" target="_blank">Copyright &copy; 2019-2022 nilife.cn</a>
                </div>
            </div>
        </div>
    </div>

    <script> 
        function showHelp(type) {
            if (type == 1) {
                $("#wechataddgif").attr("src","https://fe-resource.cdn.bcebos.com/jimuyu/editor/addpublic.gif");
            } else {
                $("#wechataddgif").attr("src","https://nilife.oss-cn-beijing.aliyuncs.com/wepage/20210605-153827-192.gif");
            }
            $("#wechataddgif").fadeToggle();
        }
        $(document).ready(function(){
            var copywechat = new ClipboardJS("#copywechat");
            var platfrom_type = $("#platfrom_type").val();
            copywechat.on('success', function(e) {
                mui.toast("已复制微信号，前往微信添加！");
                if (platfrom_type == 1 || platfrom_type == 4 || platfrom_type == 5 || platfrom_type == 11 || platfrom_type == 12) {
                    showHelp(1)
                } else {
                    showHelp(3)
                }
                window.location.href="weixin://";
            });
        });
    </script>
</body>
</html>